using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

/// <summary>
/// Summary description for Weight
/// </summary>
public class Weight:IBusinessEntity
{
    private int _weightID;
    private double _fromWeight;
    private double _toWeight;
    private double _WeightExtent;
    private string _description;

    public string Description
    {
        get { return _description; }
        set { _description = value; }
    }

    public int WeightID
    {
        get { return _weightID; }
        set { _weightID = value; }
    }

    public double FromWeight
    {
        get { return _fromWeight; }
        set { _fromWeight = value; }
    }

    public double ToWeight
    {
        get { return _toWeight; }
        set { _toWeight = value; }
    }

    public double WeightExtent
    {
        get { return _WeightExtent; }
        set { _WeightExtent = value; }
    }

    #region IBusinessEntity Members

    public void Fill(System.Data.SqlClient.SqlDataReader reader)
    {
        WeightID = reader.GetInt32(reader.GetOrdinal("WeightID"));
        if (DAL.ColumnExists(reader, "FromWeight") && !reader.IsDBNull(1))
            FromWeight = reader.GetDouble(1);
        if (DAL.ColumnExists(reader, "ToWeight") && !reader.IsDBNull(2))
            ToWeight = reader.GetDouble(2);
        if (DAL.ColumnExists(reader, "WeightExtent") && !reader.IsDBNull(3))
            WeightExtent = reader.GetDouble(3);
        if (DAL.ColumnExists(reader, "Description") && !reader.IsDBNull(4))
            Description = reader.GetString(4);
    }

    #endregion
}
